#
# This file is a part of the open-eBackup project.
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
# If a copy of the MPL was not distributed with this file, You can obtain one at
# http://mozilla.org/MPL/2.0/.
#
# Copyright (c) [2024] Huawei Technologies Co.,Ltd.
#
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
#

from exchange.commons.const import ExchangeJobInfo
from exchange.commons.exchange_function_tool import log_start_end, out_result_with_job_info


# Exchange检查是否可在本地执行基类
class ExchangeRestoreAllowRestoreInLocalNode:
    def __init__(self, pid, param):
        self._pid = pid
        self._param = param

    @log_start_end()
    @out_result_with_job_info()
    def do_allow_restore_in_local_node_task(self, job_info: ExchangeJobInfo):
        # 无校验，直接返回成功
        return True